#coding:utf8
SNR = range(-10,21)
a = [0.26380081436486214, 0.2803217408717709, 0.32516587677725116, 0.33463059875842736, 0.3514822775515653, 0.35516414124557774, 0.37811227554902876, 0.3816167145050397, 0.3852212802883653, 0.4062812896335358, 0.4420933182030572, 0.44719978639610175, 0.4727685067752487, 0.5212936386089047, 0.5888124958280488, 0.6265556371403778, 0.6734530405179895, 0.7147420065416194, 0.7508177024230692, 0.8226673786796609, 0.8707823242774181, 0.9005808023496429, 0.9339416594352846, 0.9720312395701222, 0.9761491222214805, 0.9863366931446499, 0.9970963220078767, 0.999265736599693, 0.9994647219811762, 0.9994326146452173,1.0]
b = [0.37639250216796744, 0.3916016276432526, 0.4054099126142352, 0.424688146221066, 0.4435994930291508, 0.46161029951304117, 0.48472416783403377, 0.5117403775598692, 0.5399239543726235, 0.5759122139950638, 0.6027950103395371, 0.6410512974451338, 0.678540457607898, 0.7196317790674405, 0.7585884864251885, 0.7965112400773797, 0.8399372957107598, 0.8774264558735241, 0.9131145353878994, 0.9394636782069241, 0.9618104195850844, 0.9795877526515909, 0.9895937562537522, 0.9956974184510706, 0.9977986792075245, 0.9992662264025082, 0.9998999399639784, 0.9999666466546595, 1.0, 1.0,1.0]
c = [0.608254127064, 0.610254127064, 0.61254127064, 0.613254127064, 0.6154127064, 0.61635817909,0.62935817909,0.64235817909,0.65035817909,0.66035817909, 0.670835417709,0.696748374187,0.715007503752,0.755227613807,0.785492746373 ,0.822261130565,0.846023011506,0.897048524262,0.923811905953,0.952476238119,0.973336668334 ,0.999449724862,1]
d = [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,15,20]

import matplotlib.pyplot as plt

a = [1-x for x in a]
b = [1-x for x in b]
c = [1-x for x in c]
line_lrs, = plt.plot(SNR,a, 'rs-', label='RLS')
line_mlp, = plt.plot(SNR,b, 'gv-', label='MLP')
line_cnn, = plt.plot(d,c, 'bo-', label='CNNE')
plt.legend([line_lrs,line_mlp,line_cnn],['RLS', 'MLP', 'CNNE'])
plt.xlabel("SNR", fontsize=16)
plt.ylabel("SER", fontsize=16)
plt.ylim(0,1)
plt.show()



# line_up, = plt.plot([1,2,3], label='Line 2')
# line_down, = plt.plot([3,2,1], label='Line 1')
# plt.legend([line_up, line_down], ['Line Up', 'Line Down'])
# plt.show()
